Update ModularPipelines to v3 (major) - autoclosed#16
Closed
Nice3point wants to merge 1 commit intodevelopfrom
Closed
Update ModularPipelines to v3 (major) - autoclosed#16Nice3point wants to merge 1 commit intodevelopfrom
Nice3point wants to merge 1 commit intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates ModularPipelines packages from v2.48.30 to v3.0.1, a major version update that introduces significant breaking changes requiring code migration.
Changes:
- Updated four ModularPipelines NuGet packages to version 3.0.1
- Major version includes new ASP.NET Core-style builder pattern, fluent module configuration, type-safe result handling, and numerous API changes
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Directory.Packages.props
Outdated
Comment on lines
20
to
23
| <PackageVersion Include="ModularPipelines" Version="3.0.1"/> | ||
| <PackageVersion Include="ModularPipelines.Git" Version="3.0.1"/> | ||
| <PackageVersion Include="ModularPipelines.GitHub" Version="3.0.1"/> | ||
| <PackageVersion Include="ModularPipelines.DotNet" Version="3.0.1"/> |
There was a problem hiding this comment.
This major version update introduces breaking changes that require code migration throughout the codebase. The current code uses v2 APIs that have been removed or changed in v3:
build/Program.csusesPipelineHostBuilder.Create()which needs to be replaced withPipeline.CreateBuilder(args)and the builder pattern updated- All module classes use
IPipelineContextparameters which should be changed toIModuleContext - Module methods call
GetModule<T>()directly, which should be changed tocontext.GetModule<T>() - Result access patterns use
.Value!which should migrate to.ValueOrDefaultor pattern matching for type-safe result handling ModuleRunType.AlwaysRunin RestoreReadmeModule should useConfigure().WithAlwaysRun()OnAfterExecute()method signature in PublishGithubModule has changed
The code will not compile with these package versions without these migration changes. Please refer to the ModularPipelines v3 migration guide before merging this PR.
Suggested change
| <PackageVersion Include="ModularPipelines" Version="3.0.1"/> | |
| <PackageVersion Include="ModularPipelines.Git" Version="3.0.1"/> | |
| <PackageVersion Include="ModularPipelines.GitHub" Version="3.0.1"/> | |
| <PackageVersion Include="ModularPipelines.DotNet" Version="3.0.1"/> | |
| <PackageVersion Include="ModularPipelines" Version="2.*"/> | |
| <PackageVersion Include="ModularPipelines.Git" Version="2.*"/> | |
| <PackageVersion Include="ModularPipelines.GitHub" Version="2.*"/> | |
| <PackageVersion Include="ModularPipelines.DotNet" Version="2.*"/> |
b275e96 to
6450923
Compare
6450923 to
94431da
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.48.30→3.1.62.48.30→3.1.62.48.30→3.1.62.48.30→3.1.6Release Notes
thomhurst/ModularPipelines (ModularPipelines)
v3.1.6: 3.1.6What's Changed
Full Changelog: thomhurst/ModularPipelines@v3.1.5...v3.1.6
v3.1.5: 3.1.5What's Changed
Full Changelog: thomhurst/ModularPipelines@v3.1.4...v3.1.5
v3.1.0: 3.1.0What's Changed
Full Changelog: thomhurst/ModularPipelines@v3.0.125...v3.1.0
v3.0.124: 3.0.124What's Changed
Full Changelog: thomhurst/ModularPipelines@v3.0.123...v3.0.124
v3.0.86: 3.0.86What's Changed
Full Changelog: thomhurst/ModularPipelines@v3.0.84...v3.0.86
v3.0.1: 3.0.1What's Changed
Full Changelog: thomhurst/ModularPipelines@v3.0.0...v3.0.1
v3.0.0: 3.0.0ModularPipelines V3 Release Notes
Highlights
ASP.NET Core-Style Builder Pattern
No more callbacks. Direct property access, just like ASP.NET Core minimal APIs.
If you've used ASP.NET Core, this feels instantly familiar.
Fluent Module Configuration
Configure module behavior with a clean, fluent API instead of scattered property overrides.
Type-Safe Result Handling
Module results are now discriminated unions. Pattern matching gives you compile-time safety.
Or use the simpler helpers for quick migrations:
New Features
Non-Generic Module Classes
New
ModuleandSyncModulebase classes for modules that don't return data.Internally these use the
Nonestruct, which represents "nothing" and is semantically equivalent tonull.Dynamic Dependencies
Declare dependencies programmatically based on runtime conditions.
Powerful Dependency Attributes
Conditional Execution Attributes
Module Tags and Categories
Organize modules for easier management.
Pipeline Validation
Catch configuration errors before execution.
Plugin System
Create reusable pipeline extensions.
Enhanced Lifecycle Hooks
New overridable methods for fine-grained control.
Breaking Changes
Entry Point
PipelineHostBuilder.Create()Pipeline.CreateBuilder(args).ConfigureAppConfiguration(callback)builder.Configuration.ConfigureServices(callback)builder.Services.ConfigurePipelineOptions(callback)builder.Options.AddModule<T>()on builderbuilder.Services.AddModule<T>().ExecutePipelineAsync().Build().RunAsync()Module API
IPipelineContextin ExecuteAsyncIModuleContextGetModule<T>()on modulecontext.GetModule<T>()Timeoutproperty overrideConfigure().WithTimeout()RetryPolicyproperty overrideConfigure().WithRetryCount()ShouldSkip()methodConfigure().WithSkipWhen()ShouldIgnoreFailures()methodConfigure().WithIgnoreFailures()ModuleRunType.AlwaysRunConfigure().WithAlwaysRun()OnBeforeExecute()Configure().WithBeforeExecute()orOnBeforeExecuteAsync()OnAfterExecute()Configure().WithAfterExecute()orOnAfterExecuteAsync()Result Access
result.Valueresult.ValueOrDefaultor pattern matchresult.Exceptionresult.ExceptionOrDefaultor pattern matchresult.ModuleResultType == ModuleResultType.Successresult.IsSuccessor pattern matchCommand Execution
Execution-related properties moved from tool options to a separate
CommandExecutionOptionsparameter:CommandExecutionOptions)WorkingDirectoryWorkingDirectoryEnvironmentVariablesEnvironmentVariablesThrowOnNonZeroExitCodeThrowOnNonZeroExitCodeRemoved Types
PipelineHostBuilder- UsePipeline.CreateBuilder()ModuleBase/ModuleBase<T>- UseModule<T>Migration Path
Quick Migration (Minimal Changes)
The
ExecutePipelineAsync()extension still exists:And
ValueOrDefaultprovides backwards-compatible result access:Full Migration
For the cleanest code, adopt the new patterns:
Pipeline.CreateBuilder(args)with direct property accessConfigure()builderIPipelineContexttoIModuleContextGetModule<T>()calls to contextSee the Migration Guide for detailed examples.
Upgrade Steps
dotnet add package ModularPipelines --version 3.0.0Getting Help
migrationlabelWhat's Changed
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Renovate Bot.